package com.example.base.http

import android.widget.ImageView
import com.bumptech.glide.Glide
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
import com.bumptech.glide.request.RequestOptions

object GlideUtils {
    fun getImg(url:String, iv:ImageView){
        Glide.with(iv).load(url).into(iv)
    }

    //圆形
    fun getCircleImg(url :String, iv:ImageView){
        Glide.with(iv).load(url).circleCrop().into(iv)
    }
    //圆角
    fun getRoundImg(url:String,iv:ImageView){
        Glide.with(iv).load(url).apply(RequestOptions.bitmapTransform(RoundedCorners(20))).into(iv)
    }
}